Skip to content

feat(metrics): update max user-defined dimensions from 9 to 29 #1417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

leandrodamascena
Copy link
Contributor

Issue number: #1413

Summary

Changes

Amazon added support to up 30 dimensions per metric. In this PR we increase this limit

User experience

Before: User could add up to 10 dimensions per user defined metric

After: User can add up to 30 dimensions per user defined metric.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@leandrodamascena leandrodamascena requested a review from a team as a code owner August 5, 2022 06:50
@leandrodamascena leandrodamascena requested review from rubenfonseca and removed request for a team August 5, 2022 06:50
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 5, 2022
# GIVEN we have more dimensions than CloudWatch supports
dimensions = [{"name": f"test_{i}", "value": "test"} for i in range(11)]
# GIVEN we have more dimensions than CloudWatch supports (N+1)
dimensions = [{"name": f"test_{i}", "value": "test"} for i in range(31)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps, let's start using the constant MAX_DIMENSIONS so these can be updated/failed accordingly?

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2022

Codecov Report

Merging #1417 (81a2171) into develop (144e9cc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop    #1417   +/-   ##
========================================
  Coverage    99.89%   99.89%           
========================================
  Files          119      121    +2     
  Lines         5456     5480   +24     
  Branches       624      627    +3     
========================================
+ Hits          5450     5474   +24     
  Misses           2        2           
  Partials         4        4           
Impacted Files Coverage Δ
aws_lambda_powertools/metrics/base.py 100.00% <100.00%> (ø)
aws_lambda_powertools/event_handler/__init__.py 100.00% <0.00%> (ø)
aws_lambda_powertools/event_handler/api_gateway.py 100.00% <0.00%> (ø)
aws_lambda_powertools/logging/correlation_paths.py 100.00% <0.00%> (ø)
...lambda_powertools/utilities/data_classes/common.py 100.00% <0.00%> (ø)
...mbda_powertools/utilities/data_classes/__init__.py 100.00% <0.00%> (ø)
.../utilities/data_classes/api_gateway_proxy_event.py 100.00% <0.00%> (ø)
...da_powertools/event_handler/lambda_function_url.py 100.00% <0.00%> (ø)
...tilities/data_classes/lambda_function_url_event.py 100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@heitorlessa heitorlessa changed the title improv(metrics): change the maximum number of user-defined metrics dimensions to up to 30 feat(metrics): change the maximum number of user-defined metrics dimensions to up to 30 Aug 5, 2022
@heitorlessa heitorlessa changed the title feat(metrics): change the maximum number of user-defined metrics dimensions to up to 30 feat(metrics): update max user-defined dimensions from 9 to 29 Aug 5, 2022
@github-actions github-actions bot added feature New feature or functionality area/metrics labels Aug 5, 2022
@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Aug 5, 2022
@heitorlessa
Copy link
Contributor

thanks a lot @leandrodamascena !! I've updated the documentation to reflect the new dimension limit, and reverted the test to be N+1 instead of N+2 (both works)

@heitorlessa heitorlessa removed the request for review from rubenfonseca August 5, 2022 11:42
@heitorlessa heitorlessa merged commit e542d69 into aws-powertools:develop Aug 5, 2022
@leandrodamascena leandrodamascena deleted the maintenance/metrics-increase branch August 9, 2022 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature New feature or functionality metrics size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants